class FamilyEntity {
  int id;
  int userId;
  String name;
  String icon;
  String introduction;
  String idNumber;
  String totalContribution;
  String createdAt;
  String updatedAt;
  String head;
  int persons;

  FamilyEntity(
      {this.id,
        this.userId,
        this.name,
        this.icon,
        this.introduction,
        this.idNumber,
        this.totalContribution,
        this.createdAt,
        this.updatedAt,
        this.head,
        this.persons});

  FamilyEntity.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    userId = json['user_id'];
    name = json['name'];
    icon = json['icon'];
    introduction = json['introduction'];
    idNumber = json['id_number'];
    totalContribution = json['total_contribution'];
    createdAt = json['created_at'];
    updatedAt = json['updated_at'];
    head = json['head'];
    persons = json['persons'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['user_id'] = this.userId;
    data['name'] = this.name;
    data['icon'] = this.icon;
    data['introduction'] = this.introduction;
    data['id_number'] = this.idNumber;
    data['total_contribution'] = this.totalContribution;
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    data['head'] = this.head;
    data['persons'] = this.persons;
    return data;
  }
}